<template>
  <div>
    <div class="take-goods">
      <mt-field label="" v-model="code" placeholder="请输入提货码" @keyup.native.enter="toLogin"></mt-field>
      <mt-field label="" v-model="mobile" placeholder="请输入手机号" @keyup.native.enter="toLogin"></mt-field>
      <mt-button type="primary" @click.native="toLogin">提货</mt-button>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'TakeGoods',
    data () {
      return {
        code: '',
        mobile: ''
      }
    },
    methods: {
      toLogin () {
        window.location.href = `/vue/order/coupon_export_goods?code=${this.code}&mobile=${this.mobile}`
      }
    }
  }
</script>

<style lang="less">
  .take-goods {
    width: 80vw;
    max-width: 300px;
    height: 44vw;
    max-height: 166px;
    background-color: #FFF;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-sizing: border-box;
    padding: 0 12px;
    .mint-field {
      width: 100%;
      flex: 0 0 auto;
    }
    .mint-button {
      flex: 0 0 auto;
      width: 80%;
      margin: 12px 12px 0;
    }
  }
</style>